There are two known systems that are capable of paginating html documents. The first system, called “multi-column layout,” divides an html document into a sequence of columns. This system is described in “CSS Multi-Column Layout Module,” published Dec. 17, 2009. The second system, called “epubjs,” generates an overlay that hides visual elements that are not to be displayed in a current page. This system is described in “Threepress Consulting Blog: Introducing epubjs,” published on Feb. 9, 2009, and in epubjs source code, published Apr. 7, 2009. Both multi-column layout and epubjs have disadvantages that can make pagination impracticable. Embodiments of the present invention provide a pagination technique that overcomes the disadvantages of multi-column layout and epubjs.